<?php
class Article_link_to {

	private $number;
	private $link;
	private $description;
	private $type_link;
	private $dd_link;
	private $article_number;
	private $autor_login;
	private $date;	
	private $state;

	
	public function __construct($number, $link, $description, $type_link, $dd_link,
									$article_number, $autor_login, $date, $state){
									 
		$this->number = $number; 
		$this->link = $link;
		$this->description = $description;
		$this->type_link = $type_link;
		$this->dd_link = $dd_link;
		$this->article_number = $article_number;
		$this->autor_login = $autor_login;
		$this->date = $date;
		$this->state = $state;			
	}

	public function get_number() {
		return $this->number; 
	}
	
	public function get_link() {
		return $this->link; 
	}

	public function get_description() {
		return $this->description; 
	}
	
	public function get_type_link() {
		return $this->type_link; 
	}
	
	public function get_dd_link() {
		return $this->dd_link; 
	}
	
	public function get_article_number() {
		return $this->article_number; 
	}

	public function get_autor_login() {
		return $this->autor_login; 
	}
		
	public function get_date() {
		return $this->date;
	}
	
	public function get_state() {
		return $this->state;
	}
	
	public function set_description($description) {
		$this->description = $description;
	}
	
	public function set_state($state) {
		$this->state = $state;
	}
	
	public function equals($object) {
		if ((get_class($this) != get_class($object)) ||
				($object == null))				
			 return false;
		else {
			if (($this->number == $object->get_number()) &&
				($this->link == $object->get_link()) &&
				($this->description == $object->get_description()) &&
				($this->type_link == $object->get_type_link()) &&
				($this->dd_link == $object->get_dd_link()) &&
				($this->article_number == $object->get_article_number()) &&
				($this->autor_login == $object->get_autor_login()) &&
				($this->date == $object->get_date()) &&
				($this->state == $object->get_state()))
				return true;
			return false;
		}
	}
	
	public function to_string() {
		return 'number: ' . $this->number . ' | ' .
				'link: ' . $this->link . ' | ' .
				'description: ' . $this->description . ' | ' .
				'type link: ' . $this->type_link . ' | ' .
				'dd link: ' . $this->dd_link . ' | ' .
				'article number: ' . $this->article_number . ' | ' .
				'autor login: ' . $this->autor_login . ' | ' .
				'date: ' . $this->date . ' | ' .
				'state: ' . $this->state;
	}
}

?>